Skip to content

feat(FR-2845): warn about cascading model card deletions when deleting associated vfolder#7339

Merged
graphite-app[bot] merged 1 commit into
mainfrom
05-11-feat_fr-2845_warn_about_cascading_model_card_deletions_when_deleting_associated_vfolder
May 12, 2026
Merged

feat(FR-2845): warn about cascading model card deletions when deleting associated vfolder#7339
graphite-app[bot] merged 1 commit into
mainfrom
05-11-feat_fr-2845_warn_about_cascading_model_card_deletions_when_deleting_associated_vfolder

Conversation

@ironAiken2
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 commented May 11, 2026

Resolves #7308(FR-2845)

Summary

When deleting a model card with the Also delete the associated model folder option, the underlying vfolder is removed — and any other model cards that share that vfolder are silently deleted as well. The previous UI gave no indication of this cascade.

This PR adds a strong inline warning to both the single-delete and bulk-delete model card modals. As soon as the user checks Also delete the associated model folder, an Alert appears below the checkbox:

Deleting the associated model folder will also delete every model card that uses it.

The Alert intentionally uses type="error" for visual prominence, paired with the ExclamationCircleFilled warning icon — strong cue without misrepresenting the action as an actual error state.

Changes

  • react/src/pages/AdminModelCardListPage.tsx — added conditional cascade-warning Alert under the "also delete folder" checkbox in both single and bulk delete modals.
  • resources/i18n/{en,ko}.json — added adminModelCard.AlsoDeleteModelFolderCascadeWarning.

How to test

  1. Open Admin > Model Cards.
  2. Click the delete action on any model card whose vfolder is shared with other cards.
  3. In the delete confirmation modal, check Also delete the associated model folder — the cascade warning Alert should appear immediately below the checkbox.
  4. Repeat with a bulk delete (select multiple cards → Delete Selected).

Notes

  • This is the simplified frontend response to FR-2845. The original ticket also suggested fetching VFolder.modelCards via the backend PR (lablup/backend.ai#11480) and listing the affected cards. That deeper integration is deferred — the inline warning communicates the cascade clearly without depending on a not-yet-merged backend change.

Copilot AI review requested due to automatic review settings May 11, 2026 10:17
@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization size:L 100~500 LoC labels May 11, 2026
Copy link
Copy Markdown
Contributor Author

ironAiken2 commented May 11, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an explicit warning in the Admin Model Card delete flows when the user opts to also delete the associated model vfolder, clarifying that this can cascade into deleting model cards that depend on that folder.

Changes:

  • Added a new i18n string for the cascade-deletion warning (currently in en and ko).
  • Updated the single-delete and bulk-delete confirmation modals to show an Alert when “Also delete associated model folder(s)” is checked.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
resources/i18n/ko.json Adds Korean translation for the new cascade-deletion warning string.
resources/i18n/en.json Adds English translation for the new cascade-deletion warning string.
react/src/pages/AdminModelCardListPage.tsx Shows a warning Alert in delete confirmation modals when associated vfolder deletion is enabled (single + bulk).

Comment thread react/src/pages/AdminModelCardListPage.tsx Outdated
Comment thread react/src/pages/AdminModelCardListPage.tsx Outdated
Comment thread react/src/pages/AdminModelCardListPage.tsx Outdated
Comment thread resources/i18n/en.json
@ironAiken2 ironAiken2 force-pushed the 05-11-feat_fr-2845_warn_about_cascading_model_card_deletions_when_deleting_associated_vfolder branch from 06f8762 to e7b4679 Compare May 12, 2026 01:31
@ironAiken2 ironAiken2 force-pushed the 05-11-feat_fr-2845_warn_about_cascading_model_card_deletions_when_deleting_associated_vfolder branch from e7b4679 to e5fd4e0 Compare May 12, 2026 01:38
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 12, 2026

Merge activity

…g associated vfolder (#7339)

Resolves #7308(FR-2845)

## Summary

When deleting a model card with the **Also delete the associated model folder** option, the underlying vfolder is removed — and any other model cards that share that vfolder are silently deleted as well. The previous UI gave no indication of this cascade.

This PR adds a strong inline warning to both the single-delete and bulk-delete model card modals. As soon as the user checks **Also delete the associated model folder**, an Alert appears below the checkbox:

> Deleting the associated model folder will also delete every model card that uses it.

The Alert intentionally uses `type="error"` for visual prominence, paired with the `ExclamationCircleFilled` warning icon — strong cue without misrepresenting the action as an actual error state.

## Changes

- `react/src/pages/AdminModelCardListPage.tsx` — added conditional cascade-warning Alert under the "also delete folder" checkbox in both single and bulk delete modals.
- `resources/i18n/{en,ko}.json` — added `adminModelCard.AlsoDeleteModelFolderCascadeWarning`.

## How to test

1. Open Admin > Model Cards.
2. Click the delete action on any model card whose vfolder is shared with other cards.
3. In the delete confirmation modal, check **Also delete the associated model folder** — the cascade warning Alert should appear immediately below the checkbox.
4. Repeat with a bulk delete (select multiple cards → Delete Selected).

## Notes

- This is the simplified frontend response to FR-2845. The original ticket also suggested fetching `VFolder.modelCards` via the backend PR (`lablup/backend.ai#11480`) and listing the affected cards. That deeper integration is deferred — the inline warning communicates the cascade clearly without depending on a not-yet-merged backend change.
@graphite-app graphite-app Bot force-pushed the 05-11-feat_fr-2845_warn_about_cascading_model_card_deletions_when_deleting_associated_vfolder branch from e5fd4e0 to 6b352a7 Compare May 12, 2026 04:49
@graphite-app graphite-app Bot merged commit 6b352a7 into main May 12, 2026
12 checks passed
@graphite-app graphite-app Bot deleted the 05-11-feat_fr-2845_warn_about_cascading_model_card_deletions_when_deleting_associated_vfolder branch May 12, 2026 04:50
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.46% 1783 / 27586
🔵 Statements 5.31% 1978 / 37203
🔵 Functions 5.18% 296 / 5706
🔵 Branches 3.72% 1293 / 34749
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/pages/AdminModelCardListPage.tsx 0% 0% 0% 0% 63-640
Generated in workflow #546 for commit 6b352a7 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. quick-capture size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn user about cascading model card deletions when using delete_associated_vfolder

3 participants